# DP: - Install the shared Ada libraries as '.so.1', not '.so' to conform
# DP:   to the Debian policy.
# DP: - Don't include a runtime link path (-rpath), when linking binaries.
# DP: - Build the shared libraries on hppa-linux.
# DP: - Instead of building libada as a target library only, build it as
# DP:   both a host and, if different, target library.
# DP: - Build the GNAT tools in their top-level directory; do not use
# DP:   recursive makefiles.
# DP: - Link the GNAT tools dynamically.
# DP: - Fix a bug in src/gnattools/configure.ac whereby a nonexistent version
# DP:   of indepsw's body was selected.  Regenerate configure. (PR ada/27300)

# This patch seems large, but the hunks in Makefile.in are actually
# generated from Makefile.def using autogen.

Index: b/src/gcc/ada/gcc-interface/config-lang.in
===================================================================
--- a/src/gcc/ada/gcc-interface/config-lang.in
+++ b/src/gcc/ada/gcc-interface/config-lang.in
@@ -37,7 +37,7 @@
 outputs="ada/gcc-interface/Makefile ada/Makefile"
 
 target_libs="target-libada"
-lang_dirs="gnattools"
+lang_dirs="libada gnattools"
 
 # Ada is not enabled by default for the time being.
 build_by_default=no
Index: b/src/gcc/ada/link.c
===================================================================
--- a/src/gcc/ada/link.c
+++ b/src/gcc/ada/link.c
@@ -145,8 +145,8 @@
 
 #elif defined (__FreeBSD__)
 const char *__gnat_object_file_option = "";
-const char *__gnat_run_path_option = "-Wl,-rpath,";
-char __gnat_shared_libgnat_default = STATIC;
+char *__gnat_run_path_option = "";
+char __gnat_shared_libgnat_default = SHARED;
 int __gnat_link_max = 8192;
 unsigned char __gnat_objlist_file_supported = 1;
 unsigned char __gnat_using_gnu_linker = 1;
@@ -154,8 +154,8 @@
 
 #elif defined (linux) || defined(__GLIBC__)
 const char *__gnat_object_file_option = "";
-const char *__gnat_run_path_option = "-Wl,-rpath,";
-char __gnat_shared_libgnat_default = STATIC;
+const char *__gnat_run_path_option = "";
+char __gnat_shared_libgnat_default = SHARED;
 int __gnat_link_max = 8192;
 unsigned char __gnat_objlist_file_supported = 1;
 unsigned char __gnat_using_gnu_linker = 1;
Index: b/src/gcc/ada/gcc-interface/Makefile.in
===================================================================
--- a/src/gcc/ada/gcc-interface/Makefile.in
+++ b/src/gcc/ada/gcc-interface/Makefile.in
@@ -99,7 +99,7 @@
 MAKEINFO = makeinfo
 TEXI2DVI = texi2dvi
 TEXI2PDF = texi2pdf
-GNATBIND_FLAGS = -static -x
+GNATBIND_FLAGS = -shared -x
 ADA_CFLAGS =
 ADAFLAGS = -W -Wall -gnatpg -gnata
 SOME_ADAFLAGS =-gnata
@@ -230,7 +230,6 @@
 LIBDEPS = $(LIBINTL_DEP) $(LIBIBERTY)
 # Default is no TGT_LIB; one might be passed down or something
 TGT_LIB =
-TOOLS_LIBS = $(EXTRA_GNATTOOLS_OBJS) targext.o link.o $(LIBGNAT) ../../../libiberty/libiberty.a $(SYSLIBS) $(TGT_LIB)
 
 # Specify the directories to be searched for header files.
 # Both . and srcdir are used, in that order,
@@ -276,30 +275,6 @@
 # defined in this file into the environment.
 .NOEXPORT:
 
-# Lists of files for various purposes.
-
-GNATLINK_OBJS = gnatlink.o \
- a-except.o ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o \
- gnatvsn.o hostparm.o indepsw.o interfac.o i-c.o i-cstrin.o namet.o opt.o \
- osint.o output.o rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \
- sdefault.o snames.o stylesw.o switch.o system.o table.o targparm.o tree_io.o \
- types.o validsw.o widechar.o
-
-GNATMAKE_OBJS = a-except.o ali.o ali-util.o s-casuti.o \
- alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o\
- erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o \
- gnatmake.o gnatvsn.o hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o \
- make.o makeusg.o makeutl.o mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o \
- mlib-tgt-specific.o mlib-utl.o namet.o nlists.o opt.o osint.o osint-m.o output.o \
- prj.o prj-attr.o prj-attr-pm.o prj-com.o prj-dect.o prj-env.o prj-err.o prj-ext.o prj-nmsc.o \
- prj-pars.o prj-part.o prj-proc.o prj-strt.o prj-tree.o prj-util.o \
- rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \
- scans.o scng.o sdefault.o sfn_scan.o s-purexc.o s-htable.o \
- sinfo.o sinput.o sinput-c.o sinput-p.o \
- snames.o stand.o stringt.o styleg.o stylesw.o system.o validsw.o switch.o switch-m.o \
- table.o targparm.o tempdir.o tree_io.o types.o \
- uintp.o uname.o urealp.o usage.o widechar.o \
- $(EXTRA_GNATMAKE_OBJS)
 
 # Convert the target variable into a space separated list of architecture,
 # manufacturer, and operating system and assign each of those to its own
@@ -1058,6 +1033,11 @@
   GMEM_LIB = gmemlib
 endif
 
+ifeq ($(strip $(filter-out hppa% unknown linux gnu,$(targ))),)
+  GNATLIB_SHARED = gnatlib-shared-dual
+  LIBRARY_VERSION := $(LIB_VERSION)
+endif
+
 ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
   LIBGNAT_TARGET_PAIRS = \
   a-excpol.adb<a-excpol-abort.adb \
@@ -1839,96 +1819,6 @@
  a-[a-o]*.adb a-[p-z]*.adb a-[a-o]*.ads a-[p-z]*.ads g-*.ad? i-*.ad? \
  s-[a-o]*.adb s-[p-z]*.adb s-[a-o]*.ads s-[p-z]*.ads
 
-LIBGNAT=../$(RTSDIR)/libgnat.a
-
-GCC_LINK=$(CC) -static-libgcc $(ADA_INCLUDES)
-
-# when compiling the tools, the runtime has to be first on the path so that
-# it hides the runtime files lying with the rest of the sources
-ifeq ($(TOOLSCASE),native)
-  vpath %.ads ../$(RTSDIR) ../
-  vpath %.adb ../$(RTSDIR) ../
-  vpath %.c   ../$(RTSDIR) ../
-  vpath %.h   ../$(RTSDIR) ../
-endif
-
-# in the cross tools case, everything is compiled with the native
-# gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES
-ifeq ($(TOOLSCASE),cross)
-  vpath %.ads ../
-  vpath %.adb ../
-  vpath %.c   ../
-  vpath %.h   ../
-endif
-
-common-tools:
-	$(GNATMAKE) -c -b $(ADA_INCLUDES) \
-	  --GNATBIND="$(GNATBIND)" --GCC="$(CC) $(ALL_ADAFLAGS)" \
-	  gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \
-	  gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS)
-	$(GNATLINK) -v gnatcmd -o ../../gnat$(exeext) \
-		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
-	$(GNATLINK) -v gnatchop -o ../../gnatchop$(exeext) \
-		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
-	$(GNATLINK) -v gnatkr -o ../../gnatkr$(exeext) \
-		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
-	$(GNATLINK) -v gnatls -o ../../gnatls$(exeext) \
-		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
-	$(GNATLINK) -v gnatprep -o ../../gnatprep$(exeext) \
-		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
-	$(GNATLINK) -v gnatxref -o ../../gnatxref$(exeext) \
-		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
-	$(GNATLINK) -v gnatfind -o ../../gnatfind$(exeext) \
-		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
-	$(GNATLINK) -v gnatname -o ../../gnatname$(exeext) \
-		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
-	$(GNATLINK) -v gnatclean -o ../../gnatclean$(exeext) \
-		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
-
-../../gnatsym$(exeext): 
-	$(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
-	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym
-	$(GNATLINK) -v gnatsym -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
-
-../../gnatdll$(exeext): 
-	$(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
-	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatdll
-	$(GNATLINK) -v gnatdll -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
-
-../../vxaddr2line$(exeext): targext.o
-	$(GNATMAKE) -c  $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
-	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line
-	$(GNATLINK) -v vxaddr2line -o $@ --GCC="$(GCC_LINK)" targext.o $(CLIB)
-
-gnatmake-re:  link.o targext.o
-	$(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
-	$(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
-	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake
-	$(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \
-		--GCC="$(GCC_LINK)" $(TOOLS_LIBS)
-
-# Note the use of the "mv" command in order to allow gnatlink to be linked with
-# with the former version of gnatlink itself which cannot override itself.
-gnatlink-re:  link.o targext.o
-	$(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
-	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink
-	$(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
-		    --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
-	$(MV)  ../../gnatlinknew$(exeext)  ../../gnatlink$(exeext)
-
-# Needs to be built with CC=gcc
-# Since the RTL should be built with the latest compiler, remove the
-#  stamp target in the parent directory whenever gnat1 is rebuilt
-
-# Likewise for the tools
-../../gnatmake$(exeext): $(P) b_gnatm.o link.o targext.o $(GNATMAKE_OBJS)
-	$(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
-		    $(TOOLS_LIBS)
-
-../../gnatlink$(exeext): $(P) b_gnatl.o link.o targext.o $(GNATLINK_OBJS)
-	$(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
-		    $(TOOLS_LIBS)
-
 ../stamp-gnatlib-$(RTSDIR):
 	@if [ ! -f stamp-gnatlib-$(RTSDIR) ] ; \
 	then \
@@ -1964,13 +1854,9 @@
 #     permission is required.
 	for file in gnat gnarl; do \
 	   if [ -f $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
-	      $(INSTALL) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
+	      $(INSTALL) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).1 \
 			 $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
 	   fi; \
-	   if [ -f $(RTSDIR)/lib$${file}$(soext) ]; then \
-	      $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
-	      $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \
-	   fi; \
 	done
 # This copy must be done preserving the date on the original file.
 	for file in $(RTSDIR)/*.ad?; do \
@@ -1979,18 +1865,6 @@
 	cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
 	cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
 
-../stamp-gnatlib2-$(RTSDIR):
-	$(RM) $(RTSDIR)/s-*.ali
-	$(RM) $(RTSDIR)/s-*$(objext)
-	$(RM) $(RTSDIR)/a-*.ali
-	$(RM) $(RTSDIR)/a-*$(objext)
-	$(RM) $(RTSDIR)/*.ali
-	$(RM) $(RTSDIR)/*$(objext)
-	$(RM) $(RTSDIR)/*$(arext)
-	$(RM) $(RTSDIR)/*$(soext)
-	touch ../stamp-gnatlib2-$(RTSDIR)
-	$(RM) ../stamp-gnatlib-$(RTSDIR)
-
 # NOTE: The $(foreach ...) commands assume ";" is the valid separator between
 #       successive target commands. Although the Gnu make documentation
 #       implies this is true on all systems, I suspect it may not be, So care
@@ -2000,7 +1874,7 @@
 
 # GNULLI Begin ###########################################################
 
-../stamp-gnatlib1-$(RTSDIR): Makefile ../stamp-gnatlib2-$(RTSDIR)
+../stamp-gnatlib1-$(RTSDIR): Makefile
 	$(RMDIR) $(RTSDIR)
 	$(MKDIR) $(RTSDIR)
 	$(CHMOD) u+w $(RTSDIR)
@@ -2029,7 +1903,7 @@
 # Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS)
 # is guaranteed to overflow the buffer.
 
-gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR)
+gnatlib: ../stamp-gnatlib1-$(RTSDIR)
 	$(MAKE) -C $(RTSDIR) \
 		CC="`echo \"$(GCC_FOR_TARGET)\" \
 		| sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
@@ -2068,36 +1942,49 @@
 		  $(RTSDIR)/memtrack.o
 		$(RANLIB_FOR_TARGET) $(RTSDIR)/libgmem$(arext)
         endif
-	$(CHMOD) a-wx $(RTSDIR)/*.ali
 	touch ../stamp-gnatlib-$(RTSDIR)
 
 # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
-gnatlib-shared-default:
-	$(MAKE) $(FLAGS_TO_PASS) \
-             GNATLIBFLAGS="$(GNATLIBFLAGS)" \
-	     GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
-	     GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
-	     MULTISUBDIR="$(MULTISUBDIR)" \
-	     THREAD_KIND="$(THREAD_KIND)" \
-             gnatlib
-	$(RM) $(RTSDIR)/libgna*$(soext)
+gnatlib-shared-default: ../stamp-gnatlib1-$(RTSDIR)
+	$(MAKE) -C $(RTSDIR) \
+		CC="`echo \"$(GCC_FOR_TARGET)\" \
+		| sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
+	        INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
+                CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
+		srcdir=$(fsrcdir) \
+	        -f ../Makefile $(LIBGNAT_OBJS)
+	$(MAKE) -C $(RTSDIR) \
+		CC="`echo \"$(GCC_FOR_TARGET)\" \
+		| sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
+	        ADA_INCLUDES="" \
+                CFLAGS="$(GNATLIBCFLAGS) $(GNATLIBCFLAGS_FOR_C) $(TARGET_LIBGCC2_CFLAGS)" \
+	        ADAFLAGS="$(GNATLIBFLAGS)" \
+	        THREAD_KIND="$(THREAD_KIND)" \
+		srcdir=$(fsrcdir) \
+	        -f ../Makefile \
+	        $(GNATRTL_OBJS)
+	$(RM) $(RTSDIR)/libgna*$(soext) $(RTSDIR)/libgna*$(soext).1
 	cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
 		$(TARGET_LIBGCC2_CFLAGS) \
-		-o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
+		-o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext).1 \
 		$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
 		g-trasym.o convert_addresses.o \
-		$(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
+		$(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext).1 \
 		$(MISCLIB) -lm
 	cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
 		$(TARGET_LIBGCC2_CFLAGS) \
-		-o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
+		-o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext).1 \
 		$(GNATRTL_TASKING_OBJS) \
-		$(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
+		$(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext).1 \
 		$(THREADSLIB)
-	cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
-		libgnat$(soext)
-	cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
-		libgnarl$(soext)
+	cd $(RTSDIR); for lib in gnat gnarl; do \
+		l=lib$${lib}$(hyphen)$(LIBRARY_VERSION)$(soext); \
+		$(LN_S) $$l.1 $$l; \
+	done
+# Delete the object files, lest they be linked statically into the tools
+# executables.  Only the .ali, .a and .so files must remain.
+	rm -f $(RTSDIR)/*.o
+	$(CHMOD) a-wx $(RTSDIR)/*.ali
 
 gnatlib-shared-dual:
 	$(MAKE) $(FLAGS_TO_PASS) \
@@ -2106,36 +1993,32 @@
 	     GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
 	     MULTISUBDIR="$(MULTISUBDIR)" \
 	     THREAD_KIND="$(THREAD_KIND)" \
-             gnatlib-shared-default
-	$(MV) $(RTSDIR)/libgna*$(soext) .
-	$(RM) ../stamp-gnatlib2-$(RTSDIR)
+             gnatlib
+	$(RM) $(RTSDIR)/*.o $(RTSDIR)/*.ali
 	$(MAKE) $(FLAGS_TO_PASS) \
              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
 	     GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
 	     GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
 	     MULTISUBDIR="$(MULTISUBDIR)" \
 	     THREAD_KIND="$(THREAD_KIND)" \
-             gnatlib
-	$(MV) libgna*$(soext) $(RTSDIR)
+             gnatlib-shared-default
 
 gnatlib-shared-dual-win32:
 	$(MAKE) $(FLAGS_TO_PASS) \
              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
-	     GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
+	     GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
 	     GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
 	     MULTISUBDIR="$(MULTISUBDIR)" \
 	     THREAD_KIND="$(THREAD_KIND)" \
-             gnatlib-shared-win32
-	$(MV) $(RTSDIR)/libgna*$(soext) .
-	$(RM) ../stamp-gnatlib2-$(RTSDIR)
+             gnatlib
+	$(RM) $(RTSDIR)/*.o $(RTSDIR)/*.ali
 	$(MAKE) $(FLAGS_TO_PASS) \
              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
-	     GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
+	     GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
 	     GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
 	     MULTISUBDIR="$(MULTISUBDIR)" \
 	     THREAD_KIND="$(THREAD_KIND)" \
-             gnatlib
-	$(MV) libgna*$(soext) $(RTSDIR)
+             gnatlib-shared-win32
 
 # ??? we need to add the option to support auto-import of arrays/records to
 # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
@@ -2254,22 +2137,6 @@
 gnat-cross: force
 	make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp"
 
-# Compiling object files from source files.
-
-# Note that dependencies on obstack.h are not written
-# because that file is not part of GCC.
-# Dependencies on gvarargs.h are not written
-# because all that file does, when not compiling with GCC,
-# is include the system varargs.h.
-
-b_gnatl.c : $(GNATLINK_OBJS)
-	$(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali
-b_gnatl.o : b_gnatl.c
-
-b_gnatm.c : $(GNATMAKE_OBJS)
-	$(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali
-b_gnatm.o : b_gnatm.c
-
 ADA_INCLUDE_DIR = $(libsubdir)/adainclude
 ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
 
@@ -2385,18 +2252,3 @@
 
 force:
 
-# Gnatlbr, Vms_help, and Gnat.hlp are only used on VMS
-
-../../gnatlbr$(exeext): ../../prefix.o
-	$(GNATMAKE) -c $(ADA_INCLUDES) gnatlbr --GCC="$(CC) $(ALL_ADAFLAGS)"
-	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlbr
-	$(GNATLINK) -v gnatlbr -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
-
-../../vms_help$(exeext):
-	$(GNATMAKE) -c $(ADA_INCLUDES) vms_help --GCC="$(CC) $(ALL_ADAFLAGS)"
-	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vms_help
-	$(GNATLINK) -v vms_help -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS)
-
-../../gnat.hlp: ../../vms_help$(exeext)
-	../../vms_help$(exeext) $(fsrcdir)/ada/gnat.help_in \
-	                        $(fsrcdir)/ada/vms_data.ads ../../gnat.hlp
Index: b/src/gnattools/Makefile.in
===================================================================
--- a/src/gnattools/Makefile.in
+++ b/src/gnattools/Makefile.in
@@ -18,6 +18,8 @@
 # Default target; must be first.
 all: gnattools
 
+.SUFFIXES:
+
 # Standard autoconf-set variables.
 SHELL = @SHELL@
 srcdir = @srcdir@
@@ -33,102 +35,16 @@
 LN_S=@LN_S@
 target_noncanonical=@target_noncanonical@
 
-# Variables for the user (or the top level) to override.
-exeext = @EXEEXT@
-objext=.o
-TRACE=no
-ADA_FOR_BUILD=
-ADA_FOR_TARGET=
-LDFLAGS=
-PWD_COMMAND = $${PWDCMD-pwd}
-
-# The tedious process of getting CFLAGS right.
-CFLAGS=-g
-LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-GCC_WARN_CFLAGS = $(LOOSE_WARN)
-WARN_CFLAGS = @warn_cflags@
-
-ADA_CFLAGS=@ADA_CFLAGS@
-
-# Variables for gnattools.
-ADAFLAGS= -gnatpg -gnata
-
-# For finding the GCC build dir, which is used far too much
-GCC_DIR=../gcc
-
-# Absolute srcdir for gcc (why do we want absolute?  I dunno)
-fsrcdir := $(shell cd $(srcdir)/../gcc/; ${PWD_COMMAND})
-
-# Useful "subroutines" for the excess includes
-INCLUDES_FOR_SUBDIR = -I. -I.. -I../.. -I$(fsrcdir)/ada -I$(fsrcdir)/config \
-	-I$(fsrcdir)/../include -I$(fsrcdir)
-ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)/ada
-
-# Variables for gnattools1, native
-TOOLS_FLAGS_TO_PASS_1= \
-	"CC=../../xgcc -B../../" \
-	"CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \
-	"LDFLAGS=$(LDFLAGS)" \
-	"ADAFLAGS=$(ADAFLAGS)" \
-	"ADA_CFLAGS=$(ADA_CFLAGS)" \
-	"INCLUDES=$(INCLUDES_FOR_SUBDIR)" \
-	"ADA_INCLUDES=-I- -I../rts $(ADA_INCLUDES_FOR_SUBDIR)"\
-	"exeext=$(exeext)" \
-	"fsrcdir=$(fsrcdir)" \
-	"srcdir=$(fsrcdir)" \
-	"GNATBIND=../../gnatbind" \
-	"TOOLSCASE=native"
-
-# Variables for regnattools
-TOOLS_FLAGS_TO_PASS_1re= \
-	"CC=../../xgcc -B../../" \
-	"CFLAGS=$(CFLAGS)" \
-	"ADAFLAGS=$(ADAFLAGS)" \
-	"ADA_CFLAGS=$(ADA_CFLAGS)" \
-	"INCLUDES=$(INCLUDES_FOR_SUBDIR)" \
-	"ADA_INCLUDES=-I../rts $(ADA_INCLUDES_FOR_SUBDIR)"\
-	"exeext=$(exeext)" \
-	"fsrcdir=$(fsrcdir)" \
-	"srcdir=$(fsrcdir)" \
-	"GNATMAKE=../../gnatmake" \
-	"GNATLINK=../../gnatlink" \
-	"GNATBIND=../../gnatbind" \
-	"TOOLSCASE=cross" \
-	"INCLUDES="
-
-# Variables for gnattools2, native
-TOOLS_FLAGS_TO_PASS_NATIVE= \
-	"CC=../../xgcc -B../../" \
-	"CFLAGS=$(CFLAGS)" \
-	"ADAFLAGS=$(ADAFLAGS)" \
-	"ADA_CFLAGS=$(ADA_CFLAGS)" \
-	"INCLUDES=$(INCLUDES_FOR_SUBDIR)" \
-	"ADA_INCLUDES=-I../rts $(ADA_INCLUDES_FOR_SUBDIR)" \
-	"exeext=$(exeext)" \
-	"fsrcdir=$(fsrcdir)" \
-	"srcdir=$(fsrcdir)" \
-	"GNATMAKE=../../gnatmake" \
-	"GNATLINK=../../gnatlink" \
-	"GNATBIND=../../gnatbind" \
-	"TOOLSCASE=native"
-
-# Variables for gnattools, cross
-TOOLS_FLAGS_TO_PASS_CROSS= \
-	"CC=$(CC)" \
-	"CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \
-	"LDFLAGS=$(LDFLAGS)" \
-	"ADAFLAGS=$(ADAFLAGS)"	\
-	"ADA_CFLAGS=$(ADA_CFLAGS)" \
-	"INCLUDES=$(INCLUDES_FOR_SUBDIR)" \
-	"ADA_INCLUDES=-I$(RTS_DIR)../adainclude -I$(RTS_DIR) $(ADA_INCLUDES_FOR_SUBDIR)" \
-	"exeext=$(exeext)" \
-	"fsrcdir=$(fsrcdir)" \
-	"srcdir=$(fsrcdir)" \
-	"GNATMAKE=gnatmake" \
-	"GNATLINK=gnatlink" \
-	"GNATBIND=gnatbind" \
-	"TOOLSCASE=cross" \
-	"LIBGNAT="
+CFLAGS=-O2 -Wall
+INCLUDES = -I@srcdir@/../gcc/ada -I@srcdir@/../gcc
+ADA_CFLAGS=-O2 -gnatn
+ADA_INCLUDES=-nostdinc -I- -I. -I../gcc/ada/rts -I@srcdir@/../gcc/ada
+LIB_VERSION=$(strip $(shell grep ' Library_Version :' \
+              @srcdir@/../gcc/ada/gnatvsn.ads | sed -e 's/.*"\(.*\)".*/\1/'))
+ADA_LIBS := -L../gcc/ada/rts -lgnat-$(LIB_VERSION)
+
+# We will use the just-built compiler to compile and link everything.
+GCC=../gcc/xgcc -B../gcc/
 
 # File lists
 # ----------
@@ -137,121 +53,236 @@
 EXTRA_GNATTOOLS = @EXTRA_GNATTOOLS@
 TOOLS_TARGET_PAIRS = @TOOLS_TARGET_PAIRS@
 
+# Stage 1 builds xgcc and gnatbind; we can use them to build
+# gnatmake-static and gnatlink-static, then use gnatmake-static and
+# gnatlink-static to build the other tools.  The reason we first build
+# statically-linked versions of gnatmake and gnatlink is so we can run
+# them with confidence on all build platforms, without LD_LIBRARY_PATH
+# or some such variable.
+
+# The tools we will build using gnatmake-static and gnatlink-static.
+TOOLS := gnat gnatbind gnatchop gnatclean gnatfind gnatkr gnatls gnatlink
+TOOLS += gnatmake gnatname gnatprep gnatxref
+
+# Since we don't have gnatmake, we must specify the full list of
+# object files necessary to build gnatmake and gnatlink.
+# TODO: remove from these lists the objects that are part of
+# libgnatvsn and libgnatprj.
+GNATLINK_OBJS = \
+ali.o \
+alloc.o \
+butil.o \
+casing.o \
+csets.o \
+debug.o \
+fmap.o \
+fname.o \
+gnatlink.o \
+gnatvsn.o \
+hostparm.o \
+indepsw.o \
+namet.o \
+opt.o \
+osint.o \
+output.o \
+prefix.o \
+rident.o \
+sdefault.o \
+snames.o \
+stylesw.o \
+switch.o \
+table.o \
+targparm.o \
+tree_io.o \
+types.o \
+validsw.o \
+version.o \
+widechar.o
+
+GNATMAKE_OBJS = \
+ali-util.o \
+ali.o \
+alloc.o \
+atree.o \
+binderr.o \
+butil.o \
+casing.o \
+csets.o \
+debug.o \
+einfo.o\
+elists.o \
+err_vars.o \
+erroutc.o \
+errutil.o \
+fmap.o \
+fname-sf.o \
+fname-uf.o \
+fname.o \
+gnatmake.o \
+gnatvsn.o \
+hostparm.o \
+krunch.o \
+lib.o \
+make.o \
+makeusg.o \
+makeutl.o \
+mlib-fil.o \
+mlib-prj.o \
+mlib-tgt.o \
+mlib-tgt-specific.o \
+mlib-utl.o \
+mlib.o \
+namet.o \
+nlists.o \
+opt.o \
+osint-m.o \
+osint.o \
+output.o \
+prefix.o \
+prj-attr-pm.o \
+prj-attr.o \
+prj-com.o \
+prj-dect.o \
+prj-env.o \
+prj-err.o \
+prj-ext.o \
+prj-nmsc.o \
+prj-pars.o \
+prj-part.o \
+prj-proc.o \
+prj-strt.o \
+prj-tree.o \
+prj-util.o \
+prj.o \
+rident.o \
+scans.o \
+scng.o \
+sdefault.o \
+sfn_scan.o \
+sinfo.o \
+sinput-c.o \
+sinput-p.o \
+sinput.o \
+snames.o \
+stand.o \
+stringt.o \
+styleg.o \
+stylesw.o \
+switch-m.o \
+switch.o \
+table.o \
+targparm.o \
+tempdir.o \
+tree_io.o \
+types.o \
+uintp.o \
+uname.o \
+urealp.o \
+usage.o \
+validsw.o \
+version.o \
+widechar.o \
+$(EXTRA_GNATMAKE_OBJS)
+
 # Makefile targets
 # ----------------
 
 .PHONY: gnattools gnattools-native gnattools-cross regnattools
 gnattools: @default_gnattools_target@
 
-# Sanity check
-$(GCC_DIR)/stamp-gnatlib-rts:
-	@if [ ! -f $(GCC_DIR)/stamp-gnatlib-rts ] ; \
-        then \
-          echo "Cannot build gnattools while gnatlib is out of date or unbuilt" ; \
-          false; \
-        else \
-          true; \
-        fi
-
-
 # Build directory for the tools. Let's copy the target-dependent
 # sources using the same mechanism as for gnatlib. The other sources are
-# accessed using the vpath directive in ada/Makefile.in
+# accessed using the vpath directive.
+
+stamp-gnattools-sources:
+	$(LN_S) ../gcc/ada/sdefault.adb .
+	$(foreach PAIR,$(TOOLS_TARGET_PAIRS), \
+	          rm -f $(word 1,$(subst <, ,$(PAIR)));\
+	          $(LN_S) @srcdir@/../gcc/ada/$(word 2,$(subst <, ,$(PAIR))) \
+	                  $(word 1,$(subst <, ,$(PAIR)));)
+	touch $@
+
+gnattools-native: ../gcc/ada/rts/libgnat-$(LIB_VERSION).so
+gnattools-native: stamp-gnattools-sources
+gnattools-native: $(TOOLS)
+
+$(TOOLS) gnatcmd: | gnatmake-static gnatlink-static
+
+vpath %.c @srcdir@/../gcc/ada:@srcdir@/../gcc
+vpath %.h @srcdir@/../gcc/ada
+vpath %.adb .:@srcdir@/../gcc/ada
+vpath %.ads @srcdir@/../gcc/ada
+
+# Because the just-built gcc is a host tool like us, we can use some
+# of its object files, e.g. prefix.o and version.o.
+vpath prefix.o ../gcc
+vpath version.o ../gcc
+
+# gnatlink
+
+gnatlink-static: $(GNATLINK_OBJS) b_gnatl.o link.o
+	$(GCC) -o $@ $^ \
+	   ../gcc/ada/rts/libgnat.a \
+	   ../libiberty/libiberty.a
+
+gnatlink: $(GNATLINK_OBJS) b_gnatl.o link.o
+	$(GCC) -o $@ $^ $(ADA_LIBS) ../libiberty/libiberty.a
+
+b_gnatl.o: b_gnatl.c adaint.h
+	$(GCC) -c -o $@ $(CFLAGS) $<
+
+b_gnatl.c: $(GNATLINK_OBJS)
+	../gcc/gnatbind -C -o $@ $(ADA_INCLUDES) gnatlink.ali
+
+# gnatmake
+
+gnatmake-static: $(GNATMAKE_OBJS) b_gnatm.o link.o
+	$(GCC) -o $@ $(ADA_CFLAGS) $^ \
+	   ../gcc/ada/rts/libgnat.a \
+	   ../libiberty/libiberty.a
+
+gnatmake: $(GNATMAKE_OBJS) b_gnatm.o link.o
+	$(GCC) -o $@ $(ADA_CFLAGS) $^ $(ADA_LIBS) ../libiberty/libiberty.a
+
+b_gnatm.o: b_gnatm.c adaint.h
+	$(GCC) -c -o $@ $(CFLAGS) $<
+
+b_gnatm.c: $(GNATMAKE_OBJS) adaint.h
+	../gcc/gnatbind -C -o $@ $(ADA_INCLUDES) gnatmake.ali
+
+# Other tools
+gnatkr: version.o
+	./gnatmake-static -c -b $@ $(ADA_CFLAGS) $(ADA_INCLUDES) \
+	   --GCC="$(GCC)" \
+	   --GNATBIND=../gcc/gnatbind
+	./gnatlink-static -o $@ $@.ali $^ $(ADA_INCLUDES) $(ADA_LIBS) \
+	   --GCC="$(GCC) $(ADA_INCLUDES)"
+
+gnat: gnatcmd
+	cp -lp $< $@
+
+gnatbind gnatchop gnatclean gnatcmd gnatfind gnatls gnatname gnatprep gnatxref: \
+link.o version.o prefix.o
+	./gnatmake-static -c -b $@ $(ADA_CFLAGS) $(ADA_INCLUDES) \
+	   --GCC="$(GCC)" \
+	   --GNATBIND=../gcc/gnatbind
+	./gnatlink-static -o $@ $@.ali $^ $(ADA_INCLUDES) $(ADA_LIBS) \
+	   ../libiberty/libiberty.a \
+	   --GCC="$(GCC) $(ADA_INCLUDES)"
+
+# Force compiling sdefault.adb, not .ads, to produce sdefault.o
+sdefault.o: sdefault.adb
+
+sdefault.adb: stamp-gnattools-sources
+
+%.o: %.adb
+	$(GCC) -c -o $@ $< $(ADA_CFLAGS) $(ADA_INCLUDES)
+
+%.o: %.ads
+	$(GCC) -c -o $@ $< $(ADA_CFLAGS) $(ADA_INCLUDES)
 
-$(GCC_DIR)/stamp-tools:
-	-rm -rf $(GCC_DIR)/ada/tools
-	-mkdir -p $(GCC_DIR)/ada/tools
-	-(cd $(GCC_DIR)/ada/tools; $(LN_S) ../sdefault.adb .)
-	-$(foreach PAIR,$(TOOLS_TARGET_PAIRS), \
-	          rm -f $(GCC_DIR)/ada/tools/$(word 1,$(subst <, ,$(PAIR)));\
-	          $(LN_S) $(fsrcdir)/ada/$(word 2,$(subst <, ,$(PAIR))) \
-	                $(GCC_DIR)/ada/tools/$(word 1,$(subst <, ,$(PAIR)));)
-	touch $(GCC_DIR)/stamp-tools
-
-# gnatmake/link tools cannot always be built with gnatmake/link for bootstrap 
-# reasons: gnatmake should be built with a recent compiler, a recent compiler
-# may not generate ALI files compatible with an old gnatmake so it is important
-# to be able to build gnatmake without a version of gnatmake around. Once 
-# everything has been compiled once, gnatmake can be recompiled with itself 
-# (see target regnattools) 
-gnattools-native: $(GCC_DIR)/stamp-tools $(GCC_DIR)/stamp-gnatlib-rts
-	# gnattools1
-	$(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
-	  $(TOOLS_FLAGS_TO_PASS_1) \
-	  ../../gnatmake$(exeext) ../../gnatlink$(exeext)
-	# gnattools2
-	$(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
-	  $(TOOLS_FLAGS_TO_PASS_NATIVE) common-tools
-
-# gnatmake/link can be built with recent gnatmake/link if they are available.
-# This is especially convenient for building cross tools or for rebuilding
-# the tools when the original bootstrap has already be done.
-regnattools: $(GCC_DIR)/stamp-gnatlib-rts
-	# gnattools1-re
-	$(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
-	  $(TOOLS_FLAGS_TO_PASS_1re) \
-	  gnatmake-re gnatlink-re
-	# gnattools2
-	$(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
-	  $(TOOLS_FLAGS_TO_PASS_NATIVE) common-tools
-
-# For cross builds of gnattools,
-# put the host RTS dir first in the PATH to hide the default runtime
-# files that are among the sources
-# FIXME: This should be done in configure.
-RTS_DIR:=$(strip $(subst \,/,$(shell gnatls -v | grep adalib )))
-gnattools-cross: $(GCC_DIR)/stamp-tools
-	# gnattools1-re
-	$(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
-	  $(TOOLS_FLAGS_TO_PASS_CROSS) INCLUDES="" \
-	  gnatmake-re gnatlink-re
-	# gnattools2
-	$(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
-	  $(TOOLS_FLAGS_TO_PASS_CROSS) common-tools
-	# Rename cross tools to where the GCC makefile wants them when
-	# installing.  FIXME: installation should be done elsewhere.
-	if [ -f $(GCC_DIR)/gnatbind$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatbind$(exeext) $(GCC_DIR)/gnatbind-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatchop$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatchop$(exeext) $(GCC_DIR)/gnatchop-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnat$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnat$(exeext) $(GCC_DIR)/gnat-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatkr$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatkr$(exeext) $(GCC_DIR)/gnatkr-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatlink$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatlink$(exeext) $(GCC_DIR)/gnatlink-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatls$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatls$(exeext) $(GCC_DIR)/gnatls-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatmake$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatmake$(exeext) $(GCC_DIR)/gnatmake-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatmem$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatmem$(exeext) $(GCC_DIR)/gnatmem-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatname$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatname$(exeext) $(GCC_DIR)/gnatname-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatprep$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatprep$(exeext) $(GCC_DIR)/gnatprep-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatxref$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatxref$(exeext) $(GCC_DIR)/gnatxref-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatfind$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatfind$(exeext) $(GCC_DIR)/gnatfind-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatclean$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatclean$(exeext) $(GCC_DIR)/gnatclean-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatsym$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatsym$(exeext) $(GCC_DIR)/gnatsym-cross$(exeext); \
-	fi
+%.o: %.c
+	$(GCC) -c -o $@ $< $(CFLAGS) $(INCLUDES)
 
 # Other
 # -----
@@ -279,6 +310,7 @@
 
 # Installation rules.
 install:
+	$(INSTALL) -s gnatmake gnatlink $(TOOLS) $(DESTDIR)$(bindir)
 
 install-info:
 
@@ -288,8 +320,10 @@
 
 # Cleaning rules.
 mostlyclean:
+	$(RM) gnatmake gnatlink $(TOOLS) *.o *.ali
 
 clean:
+	$(RM) *.ads *.adb stamp-gnattools-sources
 
 distclean:
 	$(RM) Makefile config.status config.log
Index: b/src/libada/Makefile.in
===================================================================
--- a/src/libada/Makefile.in
+++ b/src/libada/Makefile.in
@@ -61,7 +61,7 @@
 
 # Get target-specific overrides for TARGET_LIBGCC2_CFLAGS.
 host_subdir = @host_subdir@
-GCC_DIR=$(MULTIBUILDTOP)../../$(host_subdir)/gcc
+GCC_DIR=$(MULTIBUILDTOP)../$(host_subdir)/gcc
 include $(GCC_DIR)/libgcc.mvars
 
 target_noncanonical:=@target_noncanonical@
Index: b/src/Makefile.def
===================================================================
--- a/src/Makefile.def
+++ b/src/Makefile.def
@@ -136,7 +136,20 @@
                 missing=distclean;
                 missing=maintainer-clean; };
 host_modules= { module= utils; no_check=true; };
-host_modules= { module= gnattools; };
+host_modules= { module= libada; no_install=true; no_check=true;
+		missing= info;
+		missing= dvi;
+		missing= html;
+		missing= TAGS;
+		missing= install-info;
+		missing= installcheck; };
+host_modules= { module= gnattools; no_check=true;
+		missing= info;
+		missing= dvi;
+		missing= html;
+		missing= TAGS;
+		missing= install-info;
+		missing= installcheck; };
 
 target_modules = { module= libstdc++-v3; lib_path=.libs; raw_cxx=true; };
 target_modules = { module= libmudflap; lib_path=.libs; };
@@ -161,7 +174,13 @@
 target_modules = { module= boehm-gc; };
 target_modules = { module= qthreads; };
 target_modules = { module= rda; };
-target_modules = { module= libada; };
+target_modules = { module= libada; no_install=true; no_check=true;
+		   missing= info;
+		   missing= dvi;
+		   missing= html;
+		   missing= TAGS;
+		   missing= install-info;
+		   missing= installcheck; };
 target_modules = { module= libgomp; lib_path=.libs; };
 
 // These are (some of) the make targets to be done in each subdirectory.
@@ -336,7 +355,7 @@
 
 dependencies = { module=all-fixincludes; on=all-libiberty; };
 
-dependencies = { module=all-gnattools; on=all-target-libada; };
+dependencies = { module=all-gnattools; on=all-libada; };
 
 dependencies = { module=configure-mpfr; on=all-gmp; };
 dependencies = { module=configure-ppl; on=all-gmp; };
Index: b/src/Makefile.in
===================================================================
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -746,6 +746,7 @@
     maybe-configure-tk \
     maybe-configure-libtermcap \
     maybe-configure-utils \
+    maybe-configure-libada \
     maybe-configure-gnattools
 .PHONY: configure-target
 configure-target:  \
@@ -906,6 +907,7 @@
 all-host: maybe-all-tk
 all-host: maybe-all-libtermcap
 all-host: maybe-all-utils
+all-host: maybe-all-libada
 all-host: maybe-all-gnattools
 
 .PHONY: all-target
@@ -1023,6 +1025,7 @@
 info-host: maybe-info-tk
 info-host: maybe-info-libtermcap
 info-host: maybe-info-utils
+info-host: maybe-info-libada
 info-host: maybe-info-gnattools
 
 .PHONY: info-target
@@ -1133,6 +1136,7 @@
 dvi-host: maybe-dvi-tk
 dvi-host: maybe-dvi-libtermcap
 dvi-host: maybe-dvi-utils
+dvi-host: maybe-dvi-libada
 dvi-host: maybe-dvi-gnattools
 
 .PHONY: dvi-target
@@ -1243,6 +1247,7 @@
 pdf-host: maybe-pdf-tk
 pdf-host: maybe-pdf-libtermcap
 pdf-host: maybe-pdf-utils
+pdf-host: maybe-pdf-libada
 pdf-host: maybe-pdf-gnattools
 
 .PHONY: pdf-target
@@ -1353,6 +1358,7 @@
 html-host: maybe-html-tk
 html-host: maybe-html-libtermcap
 html-host: maybe-html-utils
+html-host: maybe-html-libada
 html-host: maybe-html-gnattools
 
 .PHONY: html-target
@@ -1463,6 +1469,7 @@
 TAGS-host: maybe-TAGS-tk
 TAGS-host: maybe-TAGS-libtermcap
 TAGS-host: maybe-TAGS-utils
+TAGS-host: maybe-TAGS-libada
 TAGS-host: maybe-TAGS-gnattools
 
 .PHONY: TAGS-target
@@ -1573,6 +1580,7 @@
 install-info-host: maybe-install-info-tk
 install-info-host: maybe-install-info-libtermcap
 install-info-host: maybe-install-info-utils
+install-info-host: maybe-install-info-libada
 install-info-host: maybe-install-info-gnattools
 
 .PHONY: install-info-target
@@ -1683,6 +1691,7 @@
 install-pdf-host: maybe-install-pdf-tk
 install-pdf-host: maybe-install-pdf-libtermcap
 install-pdf-host: maybe-install-pdf-utils
+install-pdf-host: maybe-install-pdf-libada
 install-pdf-host: maybe-install-pdf-gnattools
 
 .PHONY: install-pdf-target
@@ -1793,6 +1802,7 @@
 install-html-host: maybe-install-html-tk
 install-html-host: maybe-install-html-libtermcap
 install-html-host: maybe-install-html-utils
+install-html-host: maybe-install-html-libada
 install-html-host: maybe-install-html-gnattools
 
 .PHONY: install-html-target
@@ -1903,6 +1913,7 @@
 installcheck-host: maybe-installcheck-tk
 installcheck-host: maybe-installcheck-libtermcap
 installcheck-host: maybe-installcheck-utils
+installcheck-host: maybe-installcheck-libada
 installcheck-host: maybe-installcheck-gnattools
 
 .PHONY: installcheck-target
@@ -2013,6 +2024,7 @@
 mostlyclean-host: maybe-mostlyclean-tk
 mostlyclean-host: maybe-mostlyclean-libtermcap
 mostlyclean-host: maybe-mostlyclean-utils
+mostlyclean-host: maybe-mostlyclean-libada
 mostlyclean-host: maybe-mostlyclean-gnattools
 
 .PHONY: mostlyclean-target
@@ -2123,6 +2135,7 @@
 clean-host: maybe-clean-tk
 clean-host: maybe-clean-libtermcap
 clean-host: maybe-clean-utils
+clean-host: maybe-clean-libada
 clean-host: maybe-clean-gnattools
 
 .PHONY: clean-target
@@ -2233,6 +2246,7 @@
 distclean-host: maybe-distclean-tk
 distclean-host: maybe-distclean-libtermcap
 distclean-host: maybe-distclean-utils
+distclean-host: maybe-distclean-libada
 distclean-host: maybe-distclean-gnattools
 
 .PHONY: distclean-target
@@ -2343,6 +2357,7 @@
 maintainer-clean-host: maybe-maintainer-clean-tk
 maintainer-clean-host: maybe-maintainer-clean-libtermcap
 maintainer-clean-host: maybe-maintainer-clean-utils
+maintainer-clean-host: maybe-maintainer-clean-libada
 maintainer-clean-host: maybe-maintainer-clean-gnattools
 
 .PHONY: maintainer-clean-target
@@ -2507,6 +2522,7 @@
     maybe-check-tk \
     maybe-check-libtermcap \
     maybe-check-utils \
+    maybe-check-libada \
     maybe-check-gnattools
 
 .PHONY: check-target
@@ -2643,6 +2659,7 @@
     maybe-install-tk \
     maybe-install-libtermcap \
     maybe-install-utils \
+    maybe-install-libada \
     maybe-install-gnattools
 
 .PHONY: install-host
@@ -2720,6 +2737,7 @@
     maybe-install-tk \
     maybe-install-libtermcap \
     maybe-install-utils \
+    maybe-install-libada \
     maybe-install-gnattools
 
 .PHONY: install-target
@@ -42629,6 +42647,321 @@
 
 
 
+.PHONY: configure-libada maybe-configure-libada
+maybe-configure-libada:
+@if gcc-bootstrap
+configure-libada: stage_current
+@endif gcc-bootstrap
+@if libada
+maybe-configure-libada: configure-libada
+configure-libada: 
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	test ! -f $(HOST_SUBDIR)/libada/Makefile || exit 0; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libada ; \
+	$(HOST_EXPORTS) \
+	echo Configuring in $(HOST_SUBDIR)/libada; \
+	cd "$(HOST_SUBDIR)/libada" || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(HOST_SUBDIR)/libada/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	srcdiroption="--srcdir=$${topdir}/libada"; \
+	libsrcdir="$$s/libada"; \
+	$(SHELL) $${libsrcdir}/configure \
+	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+	  --target=${target_alias} $${srcdiroption}  \
+	  || exit 1
+@endif libada
+
+
+
+
+
+.PHONY: all-libada maybe-all-libada
+maybe-all-libada:
+@if gcc-bootstrap
+all-libada: stage_current
+@endif gcc-bootstrap
+@if libada
+TARGET-libada=all
+maybe-all-libada: all-libada
+all-libada: configure-libada
+	@: $(MAKE); $(unstage)
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	(cd $(HOST_SUBDIR)/libada && \
+	  $(MAKE) $(FLAGS_TO_PASS)  $(TARGET-libada))
+@endif libada
+
+
+
+
+.PHONY: check-libada maybe-check-libada
+maybe-check-libada:
+@if libada
+maybe-check-libada: check-libada
+
+check-libada:
+
+@endif libada
+
+.PHONY: install-libada maybe-install-libada
+maybe-install-libada:
+@if libada
+maybe-install-libada: install-libada
+
+install-libada:
+
+@endif libada
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-libada info-libada
+maybe-info-libada:
+@if libada
+maybe-info-libada: info-libada
+
+# libada doesn't support info.
+info-libada:
+
+@endif libada
+
+.PHONY: maybe-dvi-libada dvi-libada
+maybe-dvi-libada:
+@if libada
+maybe-dvi-libada: dvi-libada
+
+# libada doesn't support dvi.
+dvi-libada:
+
+@endif libada
+
+.PHONY: maybe-pdf-libada pdf-libada
+maybe-pdf-libada:
+@if libada
+maybe-pdf-libada: pdf-libada
+
+pdf-libada: \
+    configure-libada 
+	@: $(MAKE); $(unstage)
+	@[ -f ./libada/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing pdf in libada" ; \
+	(cd $(HOST_SUBDIR)/libada && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          pdf) \
+	  || exit 1
+
+@endif libada
+
+.PHONY: maybe-html-libada html-libada
+maybe-html-libada:
+@if libada
+maybe-html-libada: html-libada
+
+# libada doesn't support html.
+html-libada:
+
+@endif libada
+
+.PHONY: maybe-TAGS-libada TAGS-libada
+maybe-TAGS-libada:
+@if libada
+maybe-TAGS-libada: TAGS-libada
+
+# libada doesn't support TAGS.
+TAGS-libada:
+
+@endif libada
+
+.PHONY: maybe-install-info-libada install-info-libada
+maybe-install-info-libada:
+@if libada
+maybe-install-info-libada: install-info-libada
+
+# libada doesn't support install-info.
+install-info-libada:
+
+@endif libada
+
+.PHONY: maybe-install-pdf-libada install-pdf-libada
+maybe-install-pdf-libada:
+@if libada
+maybe-install-pdf-libada: install-pdf-libada
+
+install-pdf-libada: \
+    configure-libada \
+    pdf-libada 
+	@: $(MAKE); $(unstage)
+	@[ -f ./libada/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing install-pdf in libada" ; \
+	(cd $(HOST_SUBDIR)/libada && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          install-pdf) \
+	  || exit 1
+
+@endif libada
+
+.PHONY: maybe-install-html-libada install-html-libada
+maybe-install-html-libada:
+@if libada
+maybe-install-html-libada: install-html-libada
+
+install-html-libada: \
+    configure-libada \
+    html-libada 
+	@: $(MAKE); $(unstage)
+	@[ -f ./libada/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing install-html in libada" ; \
+	(cd $(HOST_SUBDIR)/libada && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          install-html) \
+	  || exit 1
+
+@endif libada
+
+.PHONY: maybe-installcheck-libada installcheck-libada
+maybe-installcheck-libada:
+@if libada
+maybe-installcheck-libada: installcheck-libada
+
+# libada doesn't support installcheck.
+installcheck-libada:
+
+@endif libada
+
+.PHONY: maybe-mostlyclean-libada mostlyclean-libada
+maybe-mostlyclean-libada:
+@if libada
+maybe-mostlyclean-libada: mostlyclean-libada
+
+mostlyclean-libada: 
+	@: $(MAKE); $(unstage)
+	@[ -f ./libada/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing mostlyclean in libada" ; \
+	(cd $(HOST_SUBDIR)/libada && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          mostlyclean) \
+	  || exit 1
+
+@endif libada
+
+.PHONY: maybe-clean-libada clean-libada
+maybe-clean-libada:
+@if libada
+maybe-clean-libada: clean-libada
+
+clean-libada: 
+	@: $(MAKE); $(unstage)
+	@[ -f ./libada/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing clean in libada" ; \
+	(cd $(HOST_SUBDIR)/libada && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          clean) \
+	  || exit 1
+
+@endif libada
+
+.PHONY: maybe-distclean-libada distclean-libada
+maybe-distclean-libada:
+@if libada
+maybe-distclean-libada: distclean-libada
+
+distclean-libada: 
+	@: $(MAKE); $(unstage)
+	@[ -f ./libada/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing distclean in libada" ; \
+	(cd $(HOST_SUBDIR)/libada && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          distclean) \
+	  || exit 1
+
+@endif libada
+
+.PHONY: maybe-maintainer-clean-libada maintainer-clean-libada
+maybe-maintainer-clean-libada:
+@if libada
+maybe-maintainer-clean-libada: maintainer-clean-libada
+
+maintainer-clean-libada: 
+	@: $(MAKE); $(unstage)
+	@[ -f ./libada/Makefile ] || exit 0; \
+	r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	$(HOST_EXPORTS) \
+	for flag in $(EXTRA_HOST_FLAGS) ; do \
+	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+	done; \
+	echo "Doing maintainer-clean in libada" ; \
+	(cd $(HOST_SUBDIR)/libada && \
+	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+	          "RANLIB=$${RANLIB}" \
+	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+	          maintainer-clean) \
+	  || exit 1
+
+@endif libada
+
+
+
 .PHONY: configure-gnattools maybe-configure-gnattools
 maybe-configure-gnattools:
 @if gcc-bootstrap
@@ -42689,12 +43022,6 @@
 maybe-check-gnattools: check-gnattools
 
 check-gnattools:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	(cd $(HOST_SUBDIR)/gnattools && \
-	  $(MAKE) $(FLAGS_TO_PASS)  check)
 
 @endif gnattools
 
@@ -42720,24 +43047,8 @@
 @if gnattools
 maybe-info-gnattools: info-gnattools
 
-info-gnattools: \
-    configure-gnattools 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gnattools/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing info in gnattools" ; \
-	(cd $(HOST_SUBDIR)/gnattools && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          info) \
-	  || exit 1
+# gnattools doesn't support info.
+info-gnattools:
 
 @endif gnattools
 
@@ -42746,24 +43057,8 @@
 @if gnattools
 maybe-dvi-gnattools: dvi-gnattools
 
-dvi-gnattools: \
-    configure-gnattools 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gnattools/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing dvi in gnattools" ; \
-	(cd $(HOST_SUBDIR)/gnattools && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          dvi) \
-	  || exit 1
+# gnattools doesn't support dvi.
+dvi-gnattools:
 
 @endif gnattools
 
@@ -42798,24 +43093,8 @@
 @if gnattools
 maybe-html-gnattools: html-gnattools
 
-html-gnattools: \
-    configure-gnattools 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gnattools/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing html in gnattools" ; \
-	(cd $(HOST_SUBDIR)/gnattools && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          html) \
-	  || exit 1
+# gnattools doesn't support html.
+html-gnattools:
 
 @endif gnattools
 
@@ -42824,24 +43103,8 @@
 @if gnattools
 maybe-TAGS-gnattools: TAGS-gnattools
 
-TAGS-gnattools: \
-    configure-gnattools 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gnattools/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing TAGS in gnattools" ; \
-	(cd $(HOST_SUBDIR)/gnattools && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          TAGS) \
-	  || exit 1
+# gnattools doesn't support TAGS.
+TAGS-gnattools:
 
 @endif gnattools
 
@@ -42850,25 +43113,8 @@
 @if gnattools
 maybe-install-info-gnattools: install-info-gnattools
 
-install-info-gnattools: \
-    configure-gnattools \
-    info-gnattools 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gnattools/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing install-info in gnattools" ; \
-	(cd $(HOST_SUBDIR)/gnattools && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          install-info) \
-	  || exit 1
+# gnattools doesn't support install-info.
+install-info-gnattools:
 
 @endif gnattools
 
@@ -42931,24 +43177,8 @@
 @if gnattools
 maybe-installcheck-gnattools: installcheck-gnattools
 
-installcheck-gnattools: \
-    configure-gnattools 
-	@: $(MAKE); $(unstage)
-	@[ -f ./gnattools/Makefile ] || exit 0; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(HOST_EXPORTS) \
-	for flag in $(EXTRA_HOST_FLAGS) ; do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	echo "Doing installcheck in gnattools" ; \
-	(cd $(HOST_SUBDIR)/gnattools && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	          installcheck) \
-	  || exit 1
+# gnattools doesn't support installcheck.
+installcheck-gnattools:
 
 @endif gnattools
 
@@ -52095,13 +52325,8 @@
 @if target-libada
 maybe-check-target-libada: check-target-libada
 
+# Dummy target for uncheckable module.
 check-target-libada:
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	(cd $(TARGET_SUBDIR)/libada && \
-	  $(MAKE) $(TARGET_FLAGS_TO_PASS)   check)
 
 @endif target-libada
 
@@ -52110,13 +52335,8 @@
 @if target-libada
 maybe-install-target-libada: install-target-libada
 
-install-target-libada: installdirs
-	@: $(MAKE); $(unstage)
-	@r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	(cd $(TARGET_SUBDIR)/libada && \
-	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install)
+# Dummy target for uninstallable.
+install-target-libada:
 
 @endif target-libada
 
@@ -52127,24 +52347,8 @@
 @if target-libada
 maybe-info-target-libada: info-target-libada
 
-info-target-libada: \
-    configure-target-libada 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing info in $(TARGET_SUBDIR)/libada" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libada && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           info) \
-	  || exit 1
+# libada doesn't support info.
+info-target-libada:
 
 @endif target-libada
 
@@ -52153,24 +52357,8 @@
 @if target-libada
 maybe-dvi-target-libada: dvi-target-libada
 
-dvi-target-libada: \
-    configure-target-libada 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing dvi in $(TARGET_SUBDIR)/libada" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libada && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           dvi) \
-	  || exit 1
+# libada doesn't support dvi.
+dvi-target-libada:
 
 @endif target-libada
 
@@ -52205,24 +52393,8 @@
 @if target-libada
 maybe-html-target-libada: html-target-libada
 
-html-target-libada: \
-    configure-target-libada 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing html in $(TARGET_SUBDIR)/libada" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libada && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           html) \
-	  || exit 1
+# libada doesn't support html.
+html-target-libada:
 
 @endif target-libada
 
@@ -52231,24 +52403,8 @@
 @if target-libada
 maybe-TAGS-target-libada: TAGS-target-libada
 
-TAGS-target-libada: \
-    configure-target-libada 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing TAGS in $(TARGET_SUBDIR)/libada" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libada && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           TAGS) \
-	  || exit 1
+# libada doesn't support TAGS.
+TAGS-target-libada:
 
 @endif target-libada
 
@@ -52257,25 +52413,8 @@
 @if target-libada
 maybe-install-info-target-libada: install-info-target-libada
 
-install-info-target-libada: \
-    configure-target-libada \
-    info-target-libada 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing install-info in $(TARGET_SUBDIR)/libada" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libada && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           install-info) \
-	  || exit 1
+# libada doesn't support install-info.
+install-info-target-libada:
 
 @endif target-libada
 
@@ -52338,24 +52477,8 @@
 @if target-libada
 maybe-installcheck-target-libada: installcheck-target-libada
 
-installcheck-target-libada: \
-    configure-target-libada 
-	@: $(MAKE); $(unstage)
-	@[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
-	r=`${PWD_COMMAND}`; export r; \
-	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
-	$(NORMAL_TARGET_EXPORTS) \
-	echo "Doing installcheck in $(TARGET_SUBDIR)/libada" ; \
-	for flag in $(EXTRA_TARGET_FLAGS); do \
-	  eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
-	done; \
-	(cd $(TARGET_SUBDIR)/libada && \
-	  $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
-	          "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
-	          "RANLIB=$${RANLIB}" \
-	          "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
-	           installcheck) \
-	  || exit 1
+# libada doesn't support installcheck.
+installcheck-target-libada:
 
 @endif target-libada
 
@@ -55604,7 +55727,7 @@
 all-stageprofile-libcpp: maybe-all-stageprofile-intl
 all-stagefeedback-libcpp: maybe-all-stagefeedback-intl
 all-fixincludes: maybe-all-libiberty
-all-gnattools: maybe-all-target-libada
+all-gnattools: maybe-all-libada
 configure-mpfr: maybe-all-gmp
 
 configure-stage1-mpfr: maybe-all-stage1-gmp
Index: b/src/configure.ac
===================================================================
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -158,7 +158,7 @@
 
 # these libraries are used by various programs built for the host environment
 #
-host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr ppl cloog libiconv"
+host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr ppl cloog libiconv libada"
 
 # these tools are built for the host environment
 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
@@ -271,7 +271,7 @@
 
 # Similarly, some are only suitable for cross toolchains.
 # Remove these if host=target.
-cross_only="target-libgloss target-newlib target-opcodes"
+cross_only="target-libgloss target-newlib target-opcodes target-libada"
 
 case $is_cross_compiler in
   no) skipdirs="${skipdirs} ${cross_only}" ;;
